<!--
 * @Description:长征火箭-装配进度
 * @Autor: 商晓彬
 * @Date: 2021-06-23 12:09:31
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-12-06 09:23:02
-->
<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="son modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div style="width:1880px!important;margin: 1.75rem auto;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">
                    <span>装配进度</span>
                </h4>
                <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group" style="display: flex;">
                    <label for="materialCode" style="margin-top: 7px;margin-left: 40px;margin-right: 10px;">部套名称：</label>
                    <p-dropdown name="selectBt" [options]="selectBtOptions" [(ngModel)]="selectBt" placeholder="请选择部套名称"  emptyFilterMessage="暂无数据">
                        <ng-template let-item pTemplate="selectedItem">
                            <span *ngIf="selectBt != undefind "  style="vertical-align:middle; margin-left: .5em;width: 200px;">{{item.label}}</span>
                            <span *ngIf="selectBt == undefind " style="vertical-align:middle; margin-left: .5em;width: 200px;"> </span>
                        </ng-template>
                        <ng-template let-model pTemplate="item">
                            <div class="ui-helper-clearfix" style="position: relative;height: 25px;">
                                <div style="font-size:14px;float:right;margin-top:4px;width: 200px;">{{model.label}}</div>
                            </div>
                        </ng-template>
                    </p-dropdown>
                    <button style="margin-left: 20px;" pButton type="button" label="查询"
                        (click)="getTableList()"></button>
                    <button style="margin-left: 20px;" pButton type="button" label="重置" (click)="resert()"></button>
                </div>
                <div class="form-group" style="display: flex;">
                    <label for="materialCode" style="margin-top: 7px;margin-left: 40px;">部套名称：</label>
                    <input style="width: 300px;margin-left: 10px;" readonly id="materialCode" #modelInput="ngModel"
                        type="text" name="materialCode" class="form-control" [(ngModel)]="btName" maxlength="256" />
                    <label for="materialname" style="margin-top: 7px;margin-left: 50px;">部套任务工时：</label>
                    <input style="width: 300px;margin-left: 10px;" readonly id="materialname" #lotNoInput="ngModel"
                        type="text" name="materialname" class="form-control" [(ngModel)]="btWorkHour" maxlength="256" />
                    <label for="modelName" style="margin-top: 7px;margin-left: 50px;">部套任务数量：</label>
                    <input style="width: 300px;margin-left: 10px;" readonly id="model" #modelNameInput="ngModel"
                        type="text" name="model" class="form-control" [(ngModel)]="btWorkSum" maxlength="256" />
                </div>
                <div class="row align-items-center" style="margin-top: 25px;">
                    <div class="primeng-datatable-container">
                        <p-table [value]="rowData" [paginator]="false" [lazy]="true" [scrollable]="true"
                            ScrollWidth="100%">
                            <ng-template pTemplate="header" selectionMode="multiple">
                                <tr>
                                    <th style="width: 50px">序号</th>
                                    <th style="width: 150px">规程图号</th>
                                    <th style="width: 150px">规程名称</th>
                                    <th style="width: 150px">状态</th>
                                    <th style="width: 150px">任务工时</th>
                                    <th style="width: 150px">完成工时</th>
                                    <th style="width: 150px">任务数量</th>
                                    <th style="width: 150px">完成数量</th>
                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit" let-rowIndex="rowIndex">
                                <tr>
                                    <td style="width: 50px">{{rowIndex+1}}</td>
                                    <td style="width: 150px">{{record.drawingNo}}</td>
                                    <td style="width: 150px">{{record.name}}</td>
                                    <td style="width: 150px">{{record.state}}</td>
                                    <td style="width: 150px">{{record.taskHour}}</td>
                                    <td style="width: 150px">{{record.completeHour}}</td>
                                    <td style="width: 150px">{{record.taskCount}}</td>
                                    <td style="width: 150px">{{record.completeCount}}</td>
                                </tr>
                            </ng-template>
                        </p-table>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>